#!/bin/bash
set -e

# 停止服务并禁用
if [ "$1" = "remove" ] || [ "$1" = "purge" ]; then
    systemctl stop firealam.service || true
    systemctl disable firealam.service || true
    rm -f /etc/systemd/system/firealam.service || true
    rm -f /usr/share/applications/firealam.desktop || true
fi

exit 0